const path = require('path');

module.exports = {
    style: {
        sass: {
            loaderOptions: {
                additionalData: `
          @import "@styles/variables.scss";
          @import "@styles/mixins.scss";
        `
            }
        }
    },
    webpack: {
        alias: {
            // 配置路径别名
            '@': path.resolve(__dirname, 'src'),
            '@components': path.resolve(__dirname, 'src/components'),
            '@contexts': path.resolve(__dirname, 'src/contexts'),
            '@services': path.resolve(__dirname, 'src/services'),
            '@styles': path.resolve(__dirname, 'src/styles'),
            '@utils': path.resolve(__dirname, 'src/utils'),
            '@assets': path.resolve(__dirname, 'src/assets'),
        },
        configure: (webpackConfig) => {
            // 自定义 webpack 配置
            return webpackConfig;
        }
    }
}; 